<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript">
    var obj={"name":"tom","age":18,"gender":"男"}
    var str = JSON.stringify(obj);
    console.log(typeof obj)
    console.log(typeof str)
    var obj2 = JSON.parse(str);
    console.log(typeof obj2)
    var str2="{\"userName\":\"marry\",\"passWord\":\"123\"}"
    var obj3 = JSON.parse(str2);
    console.log(typeof str2)
    console.log(obj3)

</script>
</body>
</html>